package com.bandit;

import com.bandit.config.RpcServiceConfig;
import com.bandit.remoting.transport.socket.RpcSocketServer;
import com.bandit.service.UserServiceImpl;

/**
 * @author Bandit
 * @create 2022/2/24 13:00
 */
public class SocketServerMain {
    public static void main(String[] args) {
        RpcSocketServer rpcSocketServer = new RpcSocketServer();
        UserServiceImpl userService = new UserServiceImpl();
        System.out.println(userService.getUserList());
        RpcServiceConfig rpcServiceConfig = new RpcServiceConfig();
        rpcServiceConfig.setService(userService);
        rpcSocketServer.registerService(rpcServiceConfig);
        rpcSocketServer.start();
    }
}
